import cv2
import os
from tqdm import tqdm

file_path = '/home/xys/larger_objet_Projects/微信图片_20220106164031.jpg'
file_huidu_path = '/home/xys/larger_objet_Projects/ce.jpg'

img = cv2.imread(file_path)
GrayImage = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
cv2.imwrite(file_huidu_path,GrayImage)
# filename = os.listdir(file_path)
# for file in tqdm(filename):
#     img = cv2.imread(file_path+file)
#     GrayImage = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
#     cv2.imwrite(file_huidu_path+file,GrayImage)
# print('ok')
